package com.zhoushihao.class0811;

import java.util.Scanner;

public class PrintHourGrass {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String str = sc.next();
        int sum = 0;
        int mid = n / 2;
        int k = 0;
        for (int i = 0; i < mid / 2; i++) {
            if (i * i + 2 * i <= mid && (i + 1) * (i + 1) + 2 * (i + 1) + 1 > mid) {
                k = i;
            }
        }
        for (int i = k; i > 0; i--) {
            printKong(k, i);
            printStr(i, str);
            sum += 2 * i + 1;
            System.out.println();
        }
        for (int i = 0; i <= k; i++) {
            printKong(k, i);
            printStr(i, str);
            sum += 2 * i + 1;
            System.out.println();
        }
        System.out.println(n - sum);
    }

    public static void printKong(int k, int i) {
        int flag = (k - i);
        for (int j = 0; j < flag; j++) {
            System.out.print(" ");
        }
    }

    public static void printStr(int i, String str) {
        for (int j = 0; j < 2 * i + 1; j++) {
            System.out.print(str);
        }
    }
}
